package com.maddox.mworld.ui.crash;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.maddox.mworld.R;

public class CrashTestActivity extends AppCompatActivity implements View.OnClickListener {

    private Button btn_exc;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_crash_test);
        initView();
    }

    private void initView() {
        btn_exc = (Button) findViewById(R.id.btn_exc);

        btn_exc.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_exc:
                throw new RuntimeException("自定义的异常问题!");
        }
    }
}